# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=hashrat
pkgver=1.15
pkgrel=1
groups=('blackarch' 'blackarch-crypto')
pkgdesc='Hashing tool supporting MD5, SHA1, SHA256, SHA512, Whirlpool, JH and their HMAC.'
arch=('x86_64' 'aarch64')
url='https://github.com/ColumPaget/Hashrat'
license=('GPL3')
depends=()
makedepends=('git')
source=("$pkgname::git+https://github.com/ColumPaget/Hashrat")
sha512sums=('SKIP')

prepare() {
  cd $pkgname

  ./configure --prefix=/usr --enable-largefiles --enable-xattr
}

build() {
  cd $pkgname

  make
}

package() {
  cd $pkgname

  make DESTDIR="$pkgdir" install

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" *.md

  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

